package com.xie.authority_system.service;

import com.xie.authority_system.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xie.authority_system.vo.RolePermissionVo;
import com.xie.authority_system.vo.query.PermissionQueryVo;

import java.util.List;

/**
* @author XIEJINGCHENG
* @description 针对表【sys_permission(权限表)】的数据库操作Service
* @createDate 2024-01-08 14:45:18
*/
public interface PermissionService extends IService<Permission> {
    /**
     *  根据用户id查找菜单列表
     * @param userId 用户id
     * @return 菜单列表
     */
    List<Permission> findPermissionListByUserId(Long userId);

    List<Permission> findPermissionList();

    boolean hasChildrenOfPermission(Long id);

    List<Permission> findParentPermissionList();

    RolePermissionVo findPermissionTree(Long userId, Long roleId);
}
